package ionio.cscw.game;

import java.util.ArrayList;

public class RepetitionCheck {
	ArrayList<String> wordHistory=new ArrayList<String>(5);
	public boolean checkWord(String userWord){
		boolean result=true;
		for(String word:wordHistory){
			if(word.equalsIgnoreCase(userWord)){
				result=false;
				break;
			}
		}
		wordHistory.add(userWord);
		if(wordHistory.size()==5){
			wordHistory.remove(0);
			}
		return result;
	}

}
